home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
print
/
gs261ini.zip
/
MAKE.DOC
< prev
next >
Wrap
Text File
|
1993-05-28
|
27KB
|
625 lines
Copyright (C) 1989, 1990, 1991, 1993 Aladdin Enterprises. All rights reserved.
This file is part of Ghostscript.
Ghostscript is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
to anyone for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says so in writing. Refer
to the Ghostscript General Public License for full details.
Everyone is granted permission to copy, modify and redistribute
Ghostscript, but only under the conditions described in the Ghostscript
General Public License. A copy of this license is supposed to have been
given to you along with Ghostscript so you can know your rights and
responsibilities. It should be in a file named COPYING. Among other
things, the copyright notice and this notice must be preserved on all
copies.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This file, make.doc, describes how to install Ghostscript, and how to
build Ghostscript executables from source.
For an overview of Ghostscript and a list of the documentation files, see
README.
********
******** Installing Ghostscript
********
To install the interpreter, you need:
- The interpreter executable:
- On MS-DOS and VMS systems, gs.exe.
- On MS-DOS systems, if you are using the Watcom compiler,
the DOS extender, dos4gw.exe.
- On Unix systems, gs.
- The interpreter initialization files: gs_*.ps.
- The font map: Fontmap.
- The default font: uglyr.gsf.
See use.doc for a description of the search algorithm used to find these
files.
You do not need any of these files when using the library; however, the
library currently provides no way to install fonts. This is obviously
ridiculous and will be fixed sometime in the future.
********
******** Building Ghostscript from source
********
Ghostscript is generally distributed in the form of a compressed tar file.
When unpacked, this file puts all the Ghostscript files in a directory
called gs. Ghostscript is also available in the form of PC-compatible ZIP
files.
Ghostscript is described by a collection of several makefiles:
gs.mak - a generic makefile used on all platforms (except VMS).
devs.mak - a makefile listing all the device drivers.
*.mak - the makefiles for specific platforms.
You may need to edit the platform-specific makefile if you wish to change
any of the following options:
- The default search path(s) for the initialization and font files
(macro GS_LIB_DEFAULT);
- The debugging options (macro TDEBUG);
- The set of device drivers to be included (DEVICE_DEVS
and DEVICE_DEVS1..9 macros);
- The set of optional features to be included (FEATURE_DEVS macro).
The platform-specific makefile will include comments describing all of
these items except the DEVICE_DEVS options. The DEVICE_DEVS options are
described in devs.mak, even though the file that must be edited is the
platform-specific makefile.
The makefiles distributed with Ghostscript define these options as
follows:
- GS_LIB_DEFAULT: on Unix systems, /usr/local/lib/ghostscript
and /usr/local/lib/ghostscript/fonts; on MS-DOS systems, C:\GS.
- TDEBUG: no debugging code included in the build.
- DEVICE_DEVS*: platform-specific, see below.
- FEATURE_DEVS: platform-specific.
There are also platform-specific options described below under the
individual platforms. See the "Options" section near the beginning of the
relevant makefile for more information.
If you are including a dot-matrix printer driver, you may wish to
customize the default resolution parameters in devs.mak.
To build the interpreter, you need all the .h and .c files (and .asm files
for MS-DOS) included in the distribution, as well as the makefiles.
The command
make clean
removes all the files created by the build process (relocatables,
executables, and miscellaneous scratch files). If you want to save the
executable, you should move it to another directory first.
********
******** How to build Ghostscript from source (MS-DOS version) ********
********
To find out what devices the makefiles distributed with Ghostscript
select for inclusion in the executable, find the lines in the
appropriate makefiles of the form
FEATURE_DEVS=<list of features>
and
DEVICE_DEVS=<list of devices>
(similarly DEVICE_DEVS1... up to DEVICE_DEVS9)
The relevant makefiles are:
Turbo C: tc.mak
Turbo C++/Borland C++, MS-DOS: bc.mak
Borland C++, MS Windows: bcwin.mak
Microsoft C/C++ 7.0, MS-DOS: msc.mak
Watcom C/386, MS-DOS: watc.mak
The options were chosen to strike a balance between RAM consumption
and likely usefulness. (Turbo C is limited to 640K and does not
support code overlaying; Borland C++ is limited to 640K, but supports
code overlaying under MS-DOS; Watcom C/386 is not limited to 640K.)
To build Ghostscript, you need MS-DOS version 3.3 or later, and a
(Borland) Turbo C/C++, Borland C/C++, Microsoft C/C++ (version 7), or
Watcom C/386 development system. Details are given below.
As noted above, the default configuration generates an executable that
assumes the directory where 'make' was run should be the final default
directory for looking up the Ghostscript initialization and font files.
To build the Ghostscript executable, all you need to do is give the
command
make
You must have COMMAND.COM in your path to build Ghostscript.
There is a special 'make' target that simply attempts to compile all the
.c files in the current directory. Some of these compilations will fail,
but the ones that succeed will go considerably faster, because they don't
individually pay the overhead of loading the compiler into memory. So a
good strategy for building the executable for the first time, or after a
change to a very widely used .h file, is:
make begin
and then
make
to do the compilations that failed the first time.
Note: if you get the Ghostscript sources from a Unix 'tar' file and unpack
the file on a MS-DOS machine, the files will all have linefeed instead of
carriage return + linefeed as the line terminator, which may make the C
compiler unhappy. I don't know the simplest way to fix this: just reading
each file into an editor and writing it back out again may be sufficient.
You will probably have to do this to the .c, .h, and .bat files.
Borland environment
-------------------
To compile Ghostscript with the Borland environment, you need either Turbo
C (version 2.0 or later) or Turbo C++ or Borland C++ (version 1.0 or
later); specifically, the compiler, 'make' utility, and linker. You also
need either the Borland assembler (version 1.0 or later) or the Microsoft
assembler (version 4.0 or later). Before compiling or linking, you should
execute
echo !include "tc.mak" >makefile
(for Turbo C and MS-DOS), or
echo !include "bc.mak" >makefile
(for Turbo C++ or Borland C++ and MS-DOS), or
echo !include "bcwin.mak" >makefile
(for Turbo C++ or Borland C++ and Microsoft Windows), or
Besides the source files and the makefiles, you need:
turboc.cfg (the flags and switches for Turbo C)
gs.tr (the linker commands for the interpreter)
*.bat (a variety of batch files used in the build process)
There are extensive comments in the aforementioned .mak files
regarding various configuration parameters. If your configuration is
different from the following, you should definitely read those
comments and see if you want or need to change any of the parameters:
- The compiler files are in c:\tc (for Turbo C) or c:\bc (for
Turbo C++ or Borland C++) and its subdirectories.
- You are using the Borland assembler (tasm).
- You want an executable that will run on any PC-compatible,
regardless of processor type (8088, 8086, V20, 80186, 80286, V30, 80386,
80486) and regardless of whether a math coprocessor (80x87) is present.
NOTE: Borland C++ 3.0 has two problems that affect Ghostscript (these
problems are fixed in Borland C++ 3.1):
- The assembler, tasm, often crashes when attempting to
assemble g